clearvars -except Globaloption option 

label = '-WithDebt-CY';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This code reads in the VAR dynamics and produce the Campbell-Shiller decomposition in the paper
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Load data

loaddata_4CIjoint_annual_cy_debt_partial;
ttime=[startdate:enddate];

output_rp = 0.03 - mean(cy);


%% Estimation
run ../../tools/cs_estimation;

%% steady-state upper bound calculation
upper = exp(pxbar)*(mean(taxrevgdp-spendgdp));

%% bootstrap
run ../../tools/BS_compute;

save MAT/debtinVAR_cy_partial_UK_pre1945.mat s std_coeff gdebt upper

